// import { postLoginWxMin } from "@/api/profile";
import { postTestLoginWxMin } from "@/api/profile";
export default {
  // 命名空间
  namespaced: true,
  state: {
    // 用户信息
    userInfo: null,
  },
  getters: {},
  mutations: {
    setUserInfo(state, payload) {
      state.userInfo = payload;
      // console.log(state.userInfo);
    },
  },
  actions: {
    async fetchWxLogin(store, params) {
      const res = await postTestLoginWxMin(params);
      // res.result
      store.commit("setUserInfo", res.result);
    },
  },
};
